package com.zhu.service.smtp.service.mail;


import com.alibaba.fastjson.JSON;
import com.zhu.service.base.config.MailConstance;
import com.zhu.service.smtp.pojo.Mail;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

///**
// * 消息生产者
// */
//@Component
//public class SendMailService {
//    @Autowired
//    private RabbitTemplate rabbitTemplate;
//
//    public Boolean sendMail(String uuid,String email){
//        CorrelationData correlationData=new CorrelationData(uuid);
//        Mail mail=new Mail(uuid,email);
//        String s = JSON.toJSONString(mail);
//        rabbitTemplate.convertAndSend(MailConstance.MAIL_EXCHANGE,MailConstance.MAIL_ROUTEING_KEY_NAME,s,correlationData);
//        return true;
//    }
//
//}
